https://glot.io/snippets/g5agzxnug7/raw/main.lua